
import request from "./http";

// 首页数据
export function getHome(){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            methodName:"HomePage",
            page:4,
            version:"5.61"
        }
    })
}
// 食谱详情数据
export function getDetails(id){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            dishes_id:id,
            methodName:"DishesView",
            version:"5.61"
        }
    })
}
export function getDetailsFood(id){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            dishes_id:id,
            methodName:"RecommendLike",
            version:"5.61",
            size:5
        }
    })
}

export function getDetailsNous(id){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            dishes_id:id,
            methodName:"DishesSuitable",
            version:"5.61",
        }
    })
}

export function getDetailsSense(id){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            dishes_id:id,
            methodName:"DishesCommensense",
            version:"5.61",
        }
    })
}

export function getDetailsMaterial(id){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            dishes_id:id,
            methodName:"DishesMaterial",
            version:"5.61",
        }
    })
}

// 场景数据
export function getSceneInfo(data){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            scene_id:data,
            methodName:"SceneInfo",
            version:"5.61",
        }
    })
}
// 所有场景菜谱
export function getAllFood(pages,id){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            scene_id:id,
            methodName:"SceneDishes",
            version:"5.61",
            size:20,
            page:pages
        }
    })
}
// 更多场景
export function getSceneList(Num){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            size:Num,
            methodName:"SceneList",
            version:"5.61",
        }
    })
}
// 专题列表
export function getTopicList(num){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            methodName:"TopicList",
            size:num,
            version:'5.61'
        }
    })
}

// 专题数据详情 内容
export function getDetailsTopic(id){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            methodName:"TopicView",
            topic_id:id
        }
    })
}


// 精选美食数据
export function getNiceFood(num){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            methodName:"IntelligenceRecommend",
            size:num,
            version:'5.61',
        }
    })
}

// export function getTopicTitle(data){
//     return request({
//         url:"https://api.izhangchu.com/?",
//         method:"post",
//         data:{
//             methodName:"AppShare",
//             shareID:data,
//             shareModule:"subject",
//         }
//     })
// }

// homenew
//https://api.izhangchu.com/
export function gethomenewData(id,num) {
    return request({
        url: "https://api.izhangchu.com/",
        method: "post",
        data:{ 
            "methodName": "TourIndex",
            "catid":id ,
            "size":num,
            // "type":"1",
        }
    })
}

export function gethomenewDatas(id,num) {
    return request({
        url: "https://api.izhangchu.com/",
        method: "post",
        data:{ 
            "methodName": "TourIndex",
            "catid":id ,
            "size":num,
            "type":"1",
        }
    })
}

//菜谱分类
export function getCategoryData() {
    return request({
        url: "https://api.izhangchu.com/",
        method: "post",
        data:{ "methodName": "CategoryIndex"}
    })
}

//IP视频
export function getMaterialData() {
    return request({
        url: "https://api.izhangchu.com/",
        method: "post",
        data:{ "methodName": "MaterialSubtype"}
    })
}


//美食IP
export function getFoodipData() {
    return request({
        url: "https://api.izhangchu.com/",
        method: "post",
        data:{ "methodName": "CourseLogo","version": "5.6.2"}
    })
}

//亲子IP
export function getOffspringData() {
    return request({
        url: "https://api.izhangchu.com/",
        method: "post",
        data:{ "methodName": "IpSeriesLogo","version": "5.6.2"}
    })
}

//健康IP
export function getHealthData() {
    return request({
        url: "http://javaapi.izhangchu.com:8084/zcmessage/api/ipAlbum/ipAlbumLogo?",
        method: "post",
        data:{ "version": "5.6.1"},
        params:{"albumType":"2"}
    })
}

// 课程详情
export function getDetailsCourse(id){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            methodName:"IpAlbumSeries",
            series_id:id,
            version:"5.6.2",
            series_type:"1",
        }
    })
}
export function getDetailsList(id,num){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            methodName:"IpCourseInSeries",
            series_id:id,
            version:"5.6.2",
            series_type:"1",
            size:num
        }
    })
}



// 分类菜谱详情
export function getMateria(id){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            methodName:"MaterialView",
            material_id:id,
            version:"5.6.2",
        }
    })
}

export function getMateriaVideo(id,num){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            methodName:"MaterialDishes",
            material_id:id,
            version:"5.6.2",
            size:num,

        }
    })
}



// 食材分配数据
export function getFoodsData(){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            methodName:"MaterialSubtype",
            version:"5.6.2",
        }
    })
}
// 选择食材-菜谱
export function getSomeFoods(num){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            methodName:"SearchMix",
            version:"5.6.2",
            material_ids:num,
            size:10
        }
    })
}

//moreipvideo 全部
export function getAllVideo(num){
    return request({
        url:"https://api.izhangchu.com/?",
        method:"post",
        data:{
            'methodName':"LohasRecommend",
            'version':"5.61",
            'size':num,
        }
    })
}

//美食IP
export function getFoodVideo(num) {
    return request({
        url: "https://api.izhangchu.com/?",
        method: "post",
        data:{
            "size":num,
            "version":"5.61",
            "methodName":"CourseIndex",
        }
    })
}

//健康IP
export function getHealthVideo(num) {
    return request({
        url: "http://javaapi.izhangchu.com:8084/zcmessage/api/lifeCourseSeries/CourseIndex?",
        method: "post",
        data:{
            "size":num,
            "version":"5.61",
        }
    })
}

//亲子IP
export function getOffspringVideo(num) {
    return request({
        url: "https://api.izhangchu.com/?",
        method: "post",
        data:{
            "size":num,
            "version":"5.61",
            "methodName":"ParentageIp",
            "series_type":"3",
        }
    })
}



// 搜索数据
export function getSearch(value){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            keyword:value,
            methodName:"SearchKeyword",
            version:"5.61",
        }
    })
}
// 搜索结果

export function getSearchHome(value,num){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            keyword:value,
            methodName:"SearchHome",
            version:"5.61",
            size:num
        }
    })
}
export function getSearchCourse(value,num){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            keyword:value,
            methodName:"IpCourseSearch",
            version:"5.61",
            size:num
        }
    })
}

//detailsnew
export function getDetailsNew(id){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            methodName:"TourKitchenSkill",
            id:id
        }
    })
}

//菜谱分类
export function getDetailsType(id,num){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            type:'1',
            methodName:"CategorySearch",
            cat_id:id,
            size:num
        }
    })
}

// 用户数据
export function getDetailsUser(id){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            methodName:"IpAlbum",
            album_id:id,
            version:5.61
        }
    })
}
export function getUserClass(id){
    return request({
        url:"https://api.izhangchu.com/",
        method:"post",
        data:{
            size:10,
            methodName:"IpSeriesInAlbum",
            album_id:id,
            version:5.61
        }
    })
}